package crmdna.client.member;

import java.util.Date;

import com.googlecode.objectify.annotation.Cache;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import com.googlecode.objectify.annotation.Index;

import crmdna.client.member.InteractionCore.InteractionProp;
import crmdna.client.member.InteractionCore.InteractionType;


@Entity @Cache
public class InteractionEntity {
	@Id long interactionId;
	@Index Date timestamp;
	String interaction;
	InteractionType interactionType;
	@Index long userId;
	
	public InteractionProp toProp() {
		InteractionProp interactionProp = new InteractionProp();
		interactionProp.interactionId = interactionId;
		interactionProp.timestamp = timestamp;
		interactionProp.interaction = interaction;
		interactionProp.interactionType = interactionType;
		interactionProp.userId = userId;
		
		return interactionProp;
	}
}
